/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.javafxcodeparsers.objects;

import pl.edu.amu.wmi.kino.visualjavafx.javafxcodeparsers.api.Parser;
import pl.edu.amu.wmi.kino.visualjavafx.javafxcodeparsers.tools.CanParseMatcher;

/**
 *
 * @author Admin
 */
//TODO : Grzegorz : implement this class later - for now it's just static code - SuperRect etc
public class HelperClassDeclarationsParser implements Parser{

    private static final String CAN_PARSE_REGEXP = "^\\s+public\\s+\\w+.*";

    @Override
    public boolean canParse(String s) {
        return CanParseMatcher.matches(s, CAN_PARSE_REGEXP);
    }

    @Override
    public Object parse(Object instructions, Object parent) {
        ApplicationParser parentParser = null;
        if(parent instanceof ApplicationParser)
            parentParser = (ApplicationParser)parent;
        else{
            throw new UnsupportedOperationException("HelperClassDeclarationsParser executed in improper context!");
        }

        return null;
    }

    @Override
    public boolean getProperContext(Class c) {
        //TODO : Grzegorz : change this later if necessary
        if(c==ApplicationParser.class)
            return true;
        else return false;
    }

}
